package adapter.client;

import adapter.classAdapter.DriveClassAdapter;
import adapter.dst.DriveForOS;
import adapter.objectAdapter.DriveObjectAdapter;

public class Run {
    public static void main(String[] args) {

        System.out.println("使用类适配器转换硬盘容量并展示");
        DriveForOS driveForOS = new DriveForOS();
        Double windowsRow = driveForOS.getWindowsRow(new DriveClassAdapter());
        System.out.println("该硬盘再Os系统中的容量为: " + windowsRow);

        System.out.println("===================");
        System.out.println("使用对象适配器转换硬盘容量并展示");
        Double windowsRow1 = driveForOS.getWindowsRow(new DriveObjectAdapter());
        System.out.println("该硬盘在Os系统中的容量为: " + windowsRow1);

    }
}
